package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

/**
 * 
 * @TableName medical_disease
 */
@TableName(value ="medical_disease")
public class MedicalDisease {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Medical record ID
     */
    @TableField(value = "medical_record_id")
    private Integer medicalRecordId;

    /**
     * Registration ID
     */
    @TableField(value = "registration_id")
    private Integer registrationId;

    /**
     * Disease ID
     */
    @TableField(value = "disease_id")
    private Integer diseaseId;

    /**
     * Diagnosis type (1=western, 2=traditional)
     */
    @TableField(value = "diagnosis_type")
    private Integer diagnosisType;

    /**
     * Onset date
     */
    @TableField(value = "onset_date")
    private Date onsetDate;

    /**
     * Diagnosis category (1=initial, 2=final)
     */
    @TableField(value = "diagnosis_category")
    private Integer diagnosisCategory;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Medical record ID
     */
    public Integer getMedicalRecordId() {
        return medicalRecordId;
    }

    /**
     * Medical record ID
     */
    public void setMedicalRecordId(Integer medicalRecordId) {
        this.medicalRecordId = medicalRecordId;
    }

    /**
     * Registration ID
     */
    public Integer getRegistrationId() {
        return registrationId;
    }

    /**
     * Registration ID
     */
    public void setRegistrationId(Integer registrationId) {
        this.registrationId = registrationId;
    }

    /**
     * Disease ID
     */
    public Integer getDiseaseId() {
        return diseaseId;
    }

    /**
     * Disease ID
     */
    public void setDiseaseId(Integer diseaseId) {
        this.diseaseId = diseaseId;
    }

    /**
     * Diagnosis type (1=western, 2=traditional)
     */
    public Integer getDiagnosisType() {
        return diagnosisType;
    }

    /**
     * Diagnosis type (1=western, 2=traditional)
     */
    public void setDiagnosisType(Integer diagnosisType) {
        this.diagnosisType = diagnosisType;
    }

    /**
     * Onset date
     */
    public Date getOnsetDate() {
        return onsetDate;
    }

    /**
     * Onset date
     */
    public void setOnsetDate(Date onsetDate) {
        this.onsetDate = onsetDate;
    }

    /**
     * Diagnosis category (1=initial, 2=final)
     */
    public Integer getDiagnosisCategory() {
        return diagnosisCategory;
    }

    /**
     * Diagnosis category (1=initial, 2=final)
     */
    public void setDiagnosisCategory(Integer diagnosisCategory) {
        this.diagnosisCategory = diagnosisCategory;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MedicalDisease other = (MedicalDisease) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMedicalRecordId() == null ? other.getMedicalRecordId() == null : this.getMedicalRecordId().equals(other.getMedicalRecordId()))
            && (this.getRegistrationId() == null ? other.getRegistrationId() == null : this.getRegistrationId().equals(other.getRegistrationId()))
            && (this.getDiseaseId() == null ? other.getDiseaseId() == null : this.getDiseaseId().equals(other.getDiseaseId()))
            && (this.getDiagnosisType() == null ? other.getDiagnosisType() == null : this.getDiagnosisType().equals(other.getDiagnosisType()))
            && (this.getOnsetDate() == null ? other.getOnsetDate() == null : this.getOnsetDate().equals(other.getOnsetDate()))
            && (this.getDiagnosisCategory() == null ? other.getDiagnosisCategory() == null : this.getDiagnosisCategory().equals(other.getDiagnosisCategory()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMedicalRecordId() == null) ? 0 : getMedicalRecordId().hashCode());
        result = prime * result + ((getRegistrationId() == null) ? 0 : getRegistrationId().hashCode());
        result = prime * result + ((getDiseaseId() == null) ? 0 : getDiseaseId().hashCode());
        result = prime * result + ((getDiagnosisType() == null) ? 0 : getDiagnosisType().hashCode());
        result = prime * result + ((getOnsetDate() == null) ? 0 : getOnsetDate().hashCode());
        result = prime * result + ((getDiagnosisCategory() == null) ? 0 : getDiagnosisCategory().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", medicalRecordId=").append(medicalRecordId);
        sb.append(", registrationId=").append(registrationId);
        sb.append(", diseaseId=").append(diseaseId);
        sb.append(", diagnosisType=").append(diagnosisType);
        sb.append(", onsetDate=").append(onsetDate);
        sb.append(", diagnosisCategory=").append(diagnosisCategory);
        sb.append("]");
        return sb.toString();
    }
}